package bjtu.pinet.common;

import bjtu.pinet.common.pinetpacket.Geoip;
import bjtu.pinet.common.pinetpacket.Ndn;
import bjtu.pinet.common.pinetpacket.Sinet;
import org.onlab.packet.Deserializer;
import org.onlab.packet.IPv4;
import org.onlab.packet.IPv6;

/**
 * author:chushuai
 * date:2021.2.13
 */
public enum PinetEtherType {
    IPV4(2048, "ipv4", 1),
    IPV6(34525, "ipv6",2),
    //4660对应16进制0x1234
    SINET(4660, "SINET", 3),
    GEOIP(4662, "GEOIP",4),
    NDN(34308, "NDN", 5),
    UNKNOWN(0, "unknown", 6);
    private final int etherType;
    private final String type;
    private final int networkTypeId;

    private PinetEtherType(int etherType, String type, int networkTypeId) {
        this.etherType = etherType;
        this.type = type;
        this.networkTypeId = networkTypeId;
    }

    public int getEtherType() {
        return etherType;
    }

    public String getType() {
        return type;
    }

    public int getNetworkTypeId() {
        return networkTypeId;
    }
}
